<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>4_JS的运算符</title>
</head>
<body>
<script>
    var a = 1;
    var b = 3.14;
    console.log(b / a);
    console.log(a / b);
    console.log(a % b);
    console.log(b % a);
    console.log(3 > 10);
    console.log(10 < '3');//字符串比较 如果是数字就比较数字，如果是字母就比较字母的ASCII码值 如果是字符比较数字 则将字符串转成数字再比较
    console.log('吴'.charCodeAt());
    console.log('羽'.charCodeAt());
    console.log('刘武雄'.charCodeAt(2));//查看字符串中某个字符的ASCII码值从0开始

    console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~');
    console.log(Number('10'), typeof Number('10'));//转成数字
    console.log(Number('abc'), typeof Number('abc'));//NaN
    console.log(Number(''), typeof Number(''));//0
    console.log(Number(undefined), typeof Number(undefined));//NaN
    console.log(Number(null), typeof Number(null));//0
    console.log(Number(true), typeof Number(true));//1

    let c = 10;
    let d = true;
    console.log(c == d);
    console.log(c === d);
</script>
</body>
</html>